﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Qiang.Geometry
{
    public class Surface : Geometry, ISurface
    {




        #region ISurface成员

        /// <summary>
        /// 面积。
        /// </summary>
        public double Area
        {
            get { return ComputeArea(); }
        }

        /// <summary>
        /// 质心。
        /// </summary>
        public Coordinate Centroid 
        {
            get { return ComputeCentroid(); }
        }


        #endregion


        #region ISurface函数

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public Coordinate PointOnSurface()
        {
            return null;
        }


        #endregion


        #region 内部方法

        /// <summary>
        /// 计算面积。
        /// </summary>
        /// <returns></returns>
        protected virtual double ComputeArea()
        {
            return 0;
        }

        /// <summary>
        /// 计算质心。
        /// </summary>
        /// <returns></returns>
        protected virtual Coordinate ComputeCentroid()
        {
            return null;
        }


        #endregion


        #region Geometry成员

        /// <summary>
        /// 
        /// </summary>
        public override int Dimension
        {
            get { throw new NotImplementedException(); }
        }

        IList<Coordinate> _coordinates;

        /// <summary>
        /// 坐标集合。
        /// </summary>
        public override IList<Coordinate> Coordinates
        {
            get
            {
                return _coordinates;
            }
            set
            {
                _coordinates = value;
            }
        }

        /// <summary>
        /// 是否为空。
        /// </summary>
        public override bool IsEmpty
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        /// 是否为简单图形。
        /// </summary>
        public override bool IsSimple
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        /// 
        /// </summary>
        public override GeometryType GeometryType
        {
            get { return GeometryType.Surface; }
        }



        #endregion


        #region SQL

        /// <summary>
        /// 获取WKT描述。
        /// </summary>
        /// <returns></returns>
        public override string AsText()
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// 获取WKB描述。
        /// </summary>
        /// <returns></returns>
        public override byte[] AsBinarry()
        {
            throw new NotImplementedException();
        }


        #endregion




    }
}
